'use strict';
const BaseController = require('./base');
const serviceName = 'idleCity';
// 继承baseController 并且指定serviceName
class RouterController extends BaseController {
  constructor(ctx) {
    super(ctx, serviceName);
  }

  async tree() {
    const { ctx } = this;
    ctx.success([
      {
        name: '北京',
        children: [
          {
            name: '北京市'
          }
        ]
      }
    ]);
    return
    const result = await ctx.service[this.serviceName].getTree(ctx.query);
    ctx.success(result);
  }
}
module.exports = RouterController;
